function commonFieldFilter(fieldId, fieldList) {
  const index = fieldList.findIndex(res => res.fieldId === fieldId)
  return index >= 0 ? fieldList[index].fieldName : ''
}

function commonLabelFilter(value, list) {
  const index = list.findIndex(res => res.value === value)
  return index >= 0 ? list[index].label : ''
}

export default {
  commonFieldFilter,
  commonLabelFilter
}
